package Throw;

import java.util.Scanner;
//20230404430920沈泽华
public class Main {
    public static void main(String[] args) throws Exception {
                Scanner sc = new Scanner(System.in);
                System.out.println("请输入被除数a：");
                int a = sc.nextInt();
                System.out.println("请输入除数b：");
                int b = sc.nextInt();
                div(a,b);


    }

    public static void div(int a, int b) throws Exception{
        if(0 == b)
            throw new Exception("被除数不能为0");
        Exception e = new Exception();
        double division = a / b;
        System.out.println(a+"除以"+b+"的结果是"+division);
    }
}